//
//  CXHAdMobNativeAdView.h
//  CXHAdSDK-AdMob
//
//  Created by 陈坤 on 2025/5/11.
//

#import <UIKit/UIKit.h>
#import <GoogleMobileAds/GoogleMobileAds.h>
#if __has_include(<CXHAdSDK-Adapter/CXHAdSDKAdapter.h>)
#import <CXHAdSDK-Adapter/CXHAdSDKAdapter.h>
#else
#import "CXHAdSDKAdapter.h"
#endif

NS_ASSUME_NONNULL_BEGIN

@protocol CXHAdMobNativeAdViewDelegate;

@interface CXHAdMobNativeAdView : UIView<CXHAdapterNativeAdViewDelegate>

@property (nonatomic, strong) CXHAdapterCommonReportMark *mark;

@property (nonatomic, strong) GADCustomNativeAd *adData;

@property (nonatomic, assign) NSInteger countDown;

/// [必填] 开发者需传入用来弹出目标页的ViewController，一般为当前ViewController
@property (nonatomic, weak) UIViewController *currentViewController;

@property (nonatomic, weak) id<CXHAdMobNativeAdViewDelegate> delegate;

@end

@protocol CXHAdMobNativeAdViewDelegate <NSObject>

- (void)admobNativeAdViewShowFailed:(CXHAdMobNativeAdView *)adView error:(NSError *)error;

- (void)admobNativeAdViewExpose:(CXHAdMobNativeAdView *)adView;

- (void)admobNativeAdViewClick:(CXHAdMobNativeAdView *)adView ldp:(NSString *)ldp;

- (void)admobNativeAdViewClose:(CXHAdMobNativeAdView *)adView;

- (void)admobNativeAdViewCloseLandingPageView:(CXHAdMobNativeAdView *)adView;

@end

NS_ASSUME_NONNULL_END
